package com.example.demo.day.config.learn.design.proxy.p3;

import org.springframework.cglib.proxy.Proxy;

public class MainTest {
    public static void main(String[] args) {
        AbstractSubject subject = null;
        InvocationHandler handler = null;
        handler = new DynamicProxy(new RealSubject1());
        subject = (AbstractSubject) Proxy.newProxyInstance(
                AbstractSubject.class.getClassLoader(),
                new Class[] {AbstractSubject.class}, handler
        );
        subject.request();
    }
}
